//
//  UIButton+addition.m
//  侠客行
//
//  Created by laibingqiang on 16/11/8.
//  Copyright © 2016年 laibingqiang. All rights reserved.
//

#import "UIButton+addition.h"

@implementation UIButton (addition)

- (instancetype)initWithText:(NSString *)text font:(UIFont *)font textColor:(UIColor *)textColor
{
    if (self = [super init]) {
        
        [self setTitle:text forState:UIControlStateNormal];
        
        self.titleLabel.font = font;
        
        [self setTitleColor:textColor forState:UIControlStateNormal];
        
        [self setTitleColor:[UIColor redColor] forState:UIControlStateHighlighted];
        
        self.backgroundColor = [UIColor lightGrayColor];
        
        [self sizeToFit];
        
        
    }
    
    return self;
}
@end
